package com.kingmed.kmss.framework.feign.client.kmcs;

import com.kingmed.kmss.common.dto.kmcs.KmcsConsumablesQueryDTO;
import feign.Response;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

@FeignClient(name = "PsFeignService", url = "${kmcs.url}", fallback = LbFeignFallbackService.class)
public interface PsFeignService {

    /**
     * 耗材信息
     */
    @PostMapping(value = "/km-ps/esb/queryMatByPage",
            headers = {"targetServiceCode=${kmcs.ps.targetServiceMetCode:PS.MATERIAL.QUERYMATBYPAGE}"},
            consumes = MediaType.APPLICATION_JSON_VALUE)
    Response consumables(@RequestBody KmcsConsumablesQueryDTO queryDTO);

}
